package com.teemor.im.remoting.session;


import com.teemor.im.common.model.User;
import com.teemor.im.discovery.node.ServerNode;
import io.netty.util.AttributeKey;

/**
 * 实现服务器Socket Session会话
 * Created by 尼恩 @ 疯狂创客圈
 */

public interface ServerSession {

    AttributeKey<String> KEY_USER_ID =
            AttributeKey.valueOf("key_user_id");

    AttributeKey<ServerSession> SESSION_KEY =
            AttributeKey.valueOf("SESSION_KEY");

    void writeAndFlush(Object pkg);

    String getId();

    String getSessionId();

    boolean isValid();

    User getUser();

    String getUserId();

    ServerNode getServerNode();



}
